//Factorial

# include <iostream.h>
# include <conio.h>

class Factorial {
  int number;
public:
  void calcFactorial();
};

void Factorial::calcFactorial() {
  int result = 1;
  cout << "Enter the number: ";
  cin >> number;
  while(number) {
    result *= number--;
  }
  cout << "Factorial is: " << result;
}

void main() {
  clrscr();
  Factorial fact;
  fact.calcFactorial();
  getch();
}